nice_things/fs/dirname.sh
dirname
Since 0.3.0 · Source
import "{ dirname }" from nice_things/fs/dirname.sh
Synopsisdirname <pathname>
Configuration
–
Description
Print the directory portion of <pathname>, with the last component removed.
This is a pure sh implementation of the utility specified in POSIX.
Options
–
Operands
<pathname>: A path name.
Stdin
–
Stdout
The resulting pathname is printed to stdout, trailed by a line-feed character.
Stderr
–
Exit status0: Successful completion.
Abort
–
Usage examples
dirname /usr/bin/ # /usr